package com.managertrade.dao.sqlite.entity;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@Entity
@Table(name = "kline_with_indicators")
public class KlineWithIndicatorsEntity {

    @Id
    @Column(name = "unique_id", nullable = false)
    private String uniqueId;      // uniqueId = symbol_period_timestamp

    @Column(nullable = false)
    private Long timestamp;       // 毫秒时间戳

    @Column
    private String datetime;      // 可读时间

    @Column(nullable = false)
    private String symbol;        // 币种

    @Column(nullable = false)
    private String period;        // 周期

    @Column
    private Double open;

    @Column
    private Double high;

    @Column
    private Double low;

    @Column
    private Double close;

    @Column
    private Double volume;

    @Column
    private Double ema7;

    @Column
    private Double ema21;

    @Column
    private Double macd;

    @Column
    private Double signal;

    @Column
    private Double histogram;

    @Column(name = "boll_upper")
    private Double bollUpper;

    @Column(name = "boll_middle")
    private Double bollMiddle;

    @Column(name = "boll_lower")
    private Double bollLower;

    @Column(name = "macd_diff")
    private Double macdDiff;

    @Column(name = "macd_dea")
    private Double macdDea;

    @Column(name = "macd_bar")
    private Double macdBar;
}
